package base.factory;

import base.factory.framework.Factory;
import base.factory.framework.Product;
import base.factory.idcard.IdCardFactory;
import base.factory.television.TelevisionFactory;

/**
 * @program: DesignPatterns
 * @description: Main
 * @author: Mr.Dai
 * @create: 2018-05-07 16:05
 **/
public class MainTest {
    public static void main(String[] args) {
        Factory factory = new IdCardFactory();
        Product a = factory.create("A");
        Product b = factory.create("B");
        a.use();
        b.use();
        Factory factory1=new TelevisionFactory();
        Product a1 = factory1.create("A");
        Product b1 = factory1.create("B");
        a1.use();
        b1.use();
    }
}
